package com.ffyc.cemp.web.controller;

import com.ffyc.cemp.common.dto.HttpResult;
import com.ffyc.cemp.domain.vo.MovieChartVo;
import com.ffyc.cemp.services.service.IMovieStatistics;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "统计接口")
@RestController
@RequestMapping("/api/statis")
public class StatisticsController {
    @Autowired
    private IMovieStatistics iMovieStatistics;


    @ApiOperation(value = "statisticMovieType",notes = "统计电影分布")
    @GetMapping("/statisticMovieType")
    public HttpResult<List<MovieChartVo>> statisticMovieType(){
        return HttpResult.success(iMovieStatistics.statisticeMovieType());
    }
}
